package com.meals.system.dao;

import com.meals.system.entity.IndexConfig;
import com.meals.system.util.PageQueryUtil;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Description:
 * Parm:
 * return:
 * Author: Chen
 * Date: 2021/12/5
 */
@Mapper
public interface IndexConfigMapper {

    IndexConfig selectByPrimaryKey(Long configId);

    IndexConfig selectByTypeAndGoodsId(@Param("configType") int configType, @Param("goodsId") Long goodsId);

    List<IndexConfig> findIndexConfigList(PageQueryUtil pageUtil);

    List<IndexConfig> findIndexConfigsByTypeAndNum(@Param("configType") int configType, @Param("number") int number);

    int getTotalIndexConfigs(PageQueryUtil pageUtil);

    int deleteBatch(Long[] ids);

    int deleteByPrimaryKey(Long configId);

    int insert(IndexConfig record);

    int insertSelective(IndexConfig record);

    int updateByPrimaryKey(IndexConfig record);

    int updateByPrimaryKeySelective(IndexConfig record);

}
